
            using System;
            using System.Collections.Generic;
            using System.Linq;
            using System.Text;
            using BusinessObject;
            using DataAccessLayer;

            namespace BusinessLogic
            {
                   /// <summary>
                    /// Define SubCategoryUtil class. This class user for BussinessLayer.
    
                /// </summary>
              public class SubCategoryUtil {
                    /// <summary>
                    /// Define function Insert for SubCategory Object.
                    /// </summary>
                    /// <param name="t">object data need Insert.</param>
                    /// <returns>
                    ///    True: if insert successfull.
                    ///    False: if insert error.
                    ///</returns>
                    public static bool Insert(SubCategory t)
                    {
                        
                      return SubCategoryDao.Insert(t);
                    }
                    /// <summary>
                    /// Define function Update for SubCategory Object.
                    /// </summary>
                    /// <param name="t">project data need updated.</param>
                    /// <returns>
                    ///    True: if update successful.
                    ///    False: if update Error.
                    ///</returns>
                    public static bool Update( SubCategory t )
                    {
                        
                      return SubCategoryDao.Update( t );
                    }
                    /// <summary>
                    /// Get All SubCategory object from table SubCategory.
                    /// </summary>
                    /// <returns>List SubCategory object.</returns>
                    public static List<SubCategory> GetAll()
                    {     
                        return SubCategoryDao.GetAll();
                    }
                    /// <summary>
                    /// Search SubCategory object in table SubCategory.
                    /// </summary>
                    /// <param name="t">Condition for Search.</param>
                    /// <param name="pageIndex">pageindex is postion to begin get data.</param>
                    /// <param name="pageSize"> Number of records will be returned.</param>
                    /// <param name="totalRow"> total records in this table.</param>
                    /// <returns>List SubCategoryResult objects.</returns>

                     /*public static List<SubCategoryResult> SearchSubCategorySomeCondition(SubCategoryCondition t, int pageIndex, int pageSize,ref int totalRow)
                {
                        return  SubCategoryDao.SearchSubCategorySomeCondition(t,pageIndex,pageSize,ref totalRow);
                }*/
/// <summary>
/// Get a SubCategory data object by primary key. 
/// </summary>
/// <param name="subCategoryId" >This is primary key.</param>
/// <returns>A SubCategory object.</returns>

                    public static SubCategory Get(int subCategoryId)
                    {
                      return SubCategoryDao.Get(subCategoryId);
                    }
/// <summary>
/// This function to Delete SubCategory object by primary key.
/// </summary>
/// <param name="subCategoryId" >This is primary key.</param>
/// <returns>If succesful return True else  return False.</returns>

                    public static bool Delete(int subCategoryId)
                    {
                         
                      return SubCategoryDao.Delete(subCategoryId);
                    }} }